﻿using DapperForCoreDemo.Model;
using DapperForCoreDemo.Tools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DapperForCoreDemo.Service
{
    public class Demo01Service
    {
        /// <summary>
        /// 获取商品信息
        /// </summary>
        /// <param name="sql">sql语句</param>
        /// <returns></returns>
        public List<Goods> GetGoods(string sql)
        {
            return DbContext.Query<Goods>(sql).ToList();
        }
    }
}
